import { HttpClient } from "@angular/common/http";
import { Component } from "@angular/core";
import { ActivatedRoute } from "@angular/router";
import { AlertController, NavController } from "@ionic/angular";

@Component({
  selector: "app-tab3",
  templateUrl: "tab3.page.html",
  styleUrls: ["tab3.page.scss"],
})
export class Tab3Page {
  constructor(
    public router: NavController,
    public http: HttpClient,
    public route: ActivatedRoute,
    public alertC: AlertController
  ) {}
  uname: string;
  image = null;
  banben() {
    this.alertC
      .create({
        header: "暂无更新",
        message: "当前已是最新版本",
        buttons: [
          {
            text: "确定",
          },
        ],
      })
      .then((res) => res.present());
  }
  ngOnInit(): void {
    this.uname = window.localStorage.getItem("uname");
  }
  loginOut() {
    window.localStorage.removeItem("uname");
    this.uname = null;
  }
}
